<html>

<head>
    <title>div布局</title>
    <style>
        #page {
            width: 1000px;
            height: 500px;
            border: solid 1px red;
            margin: 0px auto;
        }

        .left {
            border: solid 1px blue;
            width: 500px;
            height: 300px;
            float: left;
        }

        .right {
            border: solid 1px black;
            width: 495px;
            height: 300px;
            float: right;
        }
    </style>
</head>

<body>
    <div id="page">
        <div class="left">文本内容1</div>
        <div class="right">文本内容2</div>
    </div>
</body>

</html>